// 通用返回类型
export interface ResponseData {
  code: number;
  message: string;
  success: boolean;
}

// 权限类型
export interface Permission {
  id?: number;
  createTime?: string;
  updateTime?: string;
  pid?: number;
  name: string;
  code?: string;
  toCode?: string;
  type?: number;
  status?: number;
  level?: number;
  children?: PermissionList;
  select?: boolean;
}

// 权限列表类型
export type PermissionList = Permission[];

// 权限列表返回类型
export interface PermissionResponse extends ResponseData {
  data: PermissionList;
}

export interface PermissionForm {
  id?: number;
  pid?: number;
  name: string;
  code?: string;
  level?: number;
}
